package test;

public class Penguin extends  Pet{
    private String variety;

    public Penguin(String variety) {
        this.variety = variety;
    }

    public Penguin(String name, String health, int age, String variety) {
        super(name, health, age);
        this.variety = variety;
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }

    public Penguin() {
        super();
    }

    public Penguin(String name, String health, int age) {
        super(name, health, age);
    }

    @Override
    void eat() {
        System.out.println("给企鹅吃");
    }

    @Override
    void show() {
        System.out.println("品种：'" + variety + '\'' +
                ", 名字'" + name + '\'' +
                ", 健康：'" + health + '\'' +
                ", 年龄" + age);
    }
}
